def objectToDic(object):
	res = {}
	raise str(dir(object))
	for prop in dir(object):
		res[prop] = getattr(object, prop)
	return res
	
def getLocalizedTemplate(request, template):		
	try:
		if request.LANGUAGE_CODE == "en":
			raise Exception("Default language")		
		return r"localization/%s/%s" % (request.LANGUAGE_CODE, template)
	except:
		return template